
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">
	<h:form id="foodTableForm">
		<p:dataTable id="dataTable" var="food" value="#{foodTableController.foods}" paginator="true" rows="10"
			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15" widgetVar="foodsTable"
			emptyMessage="Nincs ilyen étel!" filteredValue="#{foodTableController.filtered}">

			<p:column id="nameColumn" filterBy="#{food.name}" headerText="Név">
				<h:outputText value="#{food.name}" />
			</p:column>
			<p:column id="calorieColumn" filterBy="#{food.calorie}" headerText="Kalória">
				<h:outputText value="#{food.calorie}" />
			</p:column>
			<p:column id="proteinColumn" filterBy="#{food.protein}" headerText="Fehérje">
				<h:outputText value="#{food.protein}" />
			</p:column>
			<p:column id="carbohydrateColumn" filterBy="#{food.carbohydrate}" headerText="Szénhidrát">
				<h:outputText value="#{food.carbohydrate}" />
			</p:column>
			<p:column id="fatColumn" filterBy="#{food.fat}" headerText="Zsír">
				<h:outputText value="#{food.fat}" />
			</p:column>
			<p:column id="fiberColumn" filterBy="#{food.fiber}" headerText="Rost">
				<h:outputText value="#{food.fiber}" />
			</p:column>
		</p:dataTable>

	</h:form>
</ui:composition>